Graphical User Interface (GUI) Script Generation and Documentation

ABSTRACT

There is disclosed a method and system for generating documentation for a GUI usage scenario. There is also disclosed a method and system for assembling a GUI script from a plurality of pre-scripted parts. In an embodiment, shadow objects are created to listen to and report activities of each GUI object of interest during a GUI usage session. The shadow objects may listen to shadowed GUI object activities during playback of the GUI script, or during a live GUI usage session. GUI object activities reported by the shadow objects are identified and converted into narrative language statements, using a pre-determined conversion list, to create human-readable documentation.

COPYRIGHT NOTICE AND PERMISSION

A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.

BACKGROUND

The present invention relates to data processing systems and software, and more specifically to a method and system for GUI script generation, and a method and system for documentation of a GUI usage scenario.

As known in the art, GUI record/playback tools give a user the capability to capture the steps required to automatically recreate a GUI usage scenario. For example, the GUI record/playback tool may capture keystrokes, user responses, window responses, etc. in a GUI script, then automatically execute each recorded step by playing back the GUI script. Such tools are often useful in GUI application testing, development, and demonstrations.

A GUI application undergoing testing and development may go through numerous iterations before it is completed. After an amendment is made, creation of a new GUI script to test and demonstrate the GUI application as amended may be beneficial. However, creating a new GUI script from a live recording every time an amendment is made may be cumbersome and impractical.

As a closely related matter, when documenting a generated GUI script, there may be significant effort expended in having a scenario developer walk step-by-step through the GUI usage scenario, while a scenario writer makes detailed notes about each step. This manual documentation process can be very cumbersome and very time-consuming. Furthermore, if the GUI application undergoes further testing and development, the documentation may quickly become outdated, requiring the documentation effort to be repeated.

What is needed is a more effective and efficient way to generate a GUI script based on a GUI usage scenario. What is also needed is a more efficient way to generate documentation for a GUI usage session.

SUMMARY

There is provided a method and system for generating documentation for a GUI usage scenario. There is also provided a method and system for assembling a GUI script from a plurality of pre-scripted parts.

In an embodiment, a scenario developer may use a plurality of pre-scripted parts to assemble a GUI script based on a GUI usage scenario. The pre-scripted parts may be used repeatedly and interchangeably to assemble different GUI scripts. Optionally, if a pre-scripted part is not available, one may be created, and stored for later use. A pre-scripted part can be readily replaced to create a new version of a GUI script without having to perform a live recording of the entire GUI usage scenario.

In order to generate documentation for a GUI usage session (such as is provided by playback of a GUI script), a plurality of shadow objects may be created to listen to each GUI widget (e.g. GUI control) and shell (e.g. window) of interest. GUI widgets and shells are collectively referred to in the present description as GUI objects. Each shadow object may listen to and report any shadowed GUI object activities immediately, or may record details about the shadowed GUI object activities to be reported later, even if the shadowed GUI object ceases to exist.

Using a pre-determined list of GUI object activities and corresponding narrative language statements, a documentation generation module converts the activities reported by the shadow objects into human-readable documentation. The narrative language statements may optionally include formatting so that the resulting documentation is easier to read. Much of the manual effort previously required to create documentation is eliminated, and only minor editing may be required to put the documentation into a final form. Accuracy of the documentation may also be significantly improved, since the documentation generation is largely automated.

In an embodiment, after initial generation of the documentation, the scenario writer may use a screen capture tool during slowed playback of a GUI script to extract screen captures to enhance the documentation.

In an aspect of the invention, there is provided a method of generating documentation for a GUI usage session, including: (i) shadowing each GUI object of interest using a corresponding shadow object, each shadow object being configured to listen to and report activities of its corresponding shadowed GUI object; (ii) identifying each activity of interest reported by each shadow object using a pre-determined list of GUI object activities; (iii) converting each GUI object activity identified in (ii) into a predetermined narrative language statement; (iv) presenting narrative language statements converted in (iii) as human-readable documentation.

In an embodiment, the identifying in (ii) includes comparing a reported GUI object activity with an activity in the pre-determined list of GUI object activities.

In an embodiment, the converting in (iii) includes matching each activity in the pre-determined list of GUI object activities with a narrative language statement in a corresponding list of pre-determined narrative language statements.

In an embodiment, the pre-determined narrative language statements contain formatting. The formatting may be, for example, one of HTML, XML, and XHTML code.

In an embodiment, the presenting in (iv) includes displaying formatted narrative language statements corresponding to the GUI usage session.

In an embodiment, the GUI usage session is created by playback of a GUI script, and the method further includes replaying the GUI script together with the documentation for selectively embedding screen captures in the documentation.

In another aspect of the invention, there is provided a system for generating documentation for a GUI usage session, including: (a) a shadow manager for creating a plurality of shadow objects to shadow each GUI object of interest, each shadow object being configured to listen to and report activities of a corresponding shadowed GUI object; (b) a pre-determined list of GUI object activities containing each activity that may be reported by the plurality of shadow objects; (c) pre-determined narrative language statements corresponding to each activity in the pre-determined list of GUI object activities; (d) a documentation generation module for converting activities of interest reported by the plurality of shadow objects into human-readable documentation, using the pre-determined list of GUI object activities and the pre-determined narrative language statements.

In an embodiment, the narrative language statements in (c) further include formatting. The formatting may be, for example, one of HTML, XML, and XHTML code.

In an embodiment, a shadow object is configured to listen to and report an activity immediately. In another embodiment, a shadow object is configured to listen to and report an activity when polled.

In another aspect of the invention, there is provided a computer readable medium containing computer executable code for generating documentation for a GUI usage session, the computer executable code including: (a) code for shadowing each GUI object of interest using a corresponding shadow object, each shadow object being configured to listen to and report activities of its corresponding shadowed GUI object; (b) code for identifying each activity of interest reported by each shadow object using a pre-determined list of GUI object activities; (c) code for converting each activity identified in (b) into a pre-determined narrative language statement; (d) code for presenting narrative language statements converted in (c) as human-readable documentation.

In an embodiment, the code for identifying in (b) includes code for comparing a reported GUI object activity with an activity in the pre-determined list of GUI object activities.

In an embodiment, the code for converting in (c) includes code for matching each activity in the pre-determined list of widget and shell activities with a narrative language statement in a corresponding list of pre-determined narrative language statements.

In an embodiment, the pre-determined narrative language statements contain formatting language. The formatting language may be, for example, one of HTML, XML, and XHTML.

In an embodiment the code for presenting in (d) includes code for displaying formatted narrative language statements corresponding to the GUI usage session.

In an embodiment, the computer executable code further includes code for replaying the GUI script corresponding to the GUI usage session together with the documentation, and for selective embedding screen captures in the documentation.

In another aspect of the invention, there is provided a method of assembling a GUI script, including: (i) selecting a suitable pre-scripted part from a catalog of pre-scripted parts for assembling at least a portion of the GUI script, each pre-scripted part being configured to accept a parameter value in place of a recorded value; (ii) repeating (i) until all suitable pre-scripted parts are selected; (iii) generating a call script configured to call the suitable pre-scripted parts, the call script being further configured to pass suitable parameter values to the selected pre-scripted parts.

In an embodiment, the method further includes, before (iii): (iv) creating a new suitable pre-scripted part to accept a parameter value in place of a recorded value; (v) repeating (iv) until all suitable pre-scripted parts necessary to complete the GUI script are available. In an embodiment, the creating in (iv) comprises modifying a previously recorded GUI script.

In an embodiment, the method further includes replacing in the call script a pre-scripted part with another pre-scripted part to form a new version of the GUI script.

In an embodiment, the method further includes storing multiple versions of the GUI script for subsequent retrieval.

In another aspect of the invention, there is provided a system for assembling a GUI script, including: (a) a catalog of pre-scripted parts for assembling at least a portion of the GUI script, each pre-scripted part being configured to accept parameter values in place of recorded values; (b) a script execution module for generating a call script configured to call suitable pre-scripted parts to assemble at least a part of the GUI script, the call script being further configured to pass suitable parameter values to the suitable pre-scripted parts.

In an embodiment, the system further includes means for generating a new suitable pre-scripted part for the catalog.

In an embodiment, the script execution module is configurable to replace in the call script a pre-scripted part with another pre-scripted part to form a new version of the GUI script.

In an embodiment, the system further includes storage for storing multiple versions of the GUI script for subsequent retrieval.

In another aspect of the invention, there is provided a computer readable medium containing computer executable code for assembling a GUI script, the computer executable code including: (a) code for selecting a suitable pre-scripted part from a catalog of pre-scripted parts for assembling at least a portion of the GUI script, each pre-scripted part being configured to accept a parameter value in place of a recorded value; (b) code for repeating (a) until all suitable pre-scripted parts are selected; (c) code for generating a call script configured to call the suitable pre-scripted parts, the call script being further configured to pass suitable parameter values to the selected pre-scripted parts.

In an embodiment the computer executable code further includes: (d) code for creating a new suitable pre-scripted part to accept a parameter value in place of a recorded value; (e) code for repeating (d) until all suitable pre-scripted parts necessary to complete the GUI script are available. In an embodiment, the code for creating in (d) comprises code for modifying a previously recorded GUI script.

In an embodiment the computer executable code further includes code for replacing in the call script a pre-scripted part with another pre-scripted part to form a new version of the GUI script.

The foregoing and other aspects of the invention will be apparent from the following more particular descriptions of exemplary embodiments.

BRIEF DESCRIPTIONS OF THE DRAWINGS

In the figures which illustrate exemplary embodiments of the invention:

FIG. 1 shows an illustrative data processing system which may provide an operating environment for various exemplary embodiments.

FIG. 2 shows a schematic block diagram of a system for generating a GUI script and for generating documentation, in accordance with an embodiment of the invention.

FIG. 3A shows an illustrative example of a recorded GUI script.

FIG. 3B shows an illustrative example of a “pre-scripted part” created from the GUI script of FIG. 3A, modified to accept various parameters.

FIG. 3C shows an illustrative example of a call script that can call the modified “pre-scripted part” form of the script of FIG. 3B.

FIG. 4 shows a schematic Unified Modeling Language (UML) model of an illustrative set of shadow objects which may be used in generating documentation, in accordance with an illustrative embodiment of the invention.

FIG. 4A is a schematic flow chart of a method for creating the shadow objects in the UML model of FIG. 4.

FIG. 4B is a schematic flow chart of a method for creating shell shadows in the UML model of FIG. 4.

FIG. 4C is a schematic flow chart of a method for setting the reporting mode of each shadow object depending on type.

FIG. 4D is a schematic flow chart of a method for identifying all widgets of interest in a shell, and for creating corresponding shadow objects.

FIG. 5 is an illustrative example of a generated GUI script.

FIG. 6A is an illustrative example of a pre-determined list of GUI activities.

FIG. 6B is an illustrative example of a list of narrative language statements corresponding to each activity listed in FIG. 6A (formatted for Hyper-Text Markup Language or HTML in this illustrative example).

FIG. 7 is an illustrative example of formatting and presentation of narrative language statements corresponding to the generated GUI script of FIG. 5.

FIG. 8 is a schematic flow chart of a method for generating a GUI script and for generating documentation, in accordance with an illustrative embodiment of the invention.

FIG. 8A is a schematic flow chart of a detail of FIG. 8.

FIG. 8B is a schematic flow chart of another detail of FIG. 8.

FIG. 8C is a schematic flow chart of yet another detail of FIG. 8.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

FIG. 1 shows an illustrative data processing system 100 that may provide an operating environment for exemplary embodiments of the invention. The data processing system 100 may include a central processing unit (“CPU”) 102 connected to a storage unit 104 and to a random access memory (“RAM”) 106. The CPU 102 may execute an operating system 101, and a plurality of software applications 103. The operating system 101 and applications 103 may be stored in the storage unit 104 and loaded into RAM 106, as required. A user 107 may interact with the data processing system 100 using a video display 108 connected by a video interface 105, and various input/output devices such as a keyboard 110, mouse 112, and disk drive 114 connected by an I/O interface 109. The disk drive 114 may be configured to accept computer readable media 116. Optionally, the data processing system 100 may be network enabled via a network interface 111.

It will be appreciated that the data processing system 100 of FIG. 1 is merely illustrative and is not meant to be limiting in terms of the type of system that might provide a suitable operating environment for the invention. As an illustrative example, the data processing system 100 may run an Eclipse Integrated Development Environment (IDE) platform.

FIG. 2 shows a schematic block diagram of a system for generating a GUI script and for generating documentation for the same, in accordance with an exemplary embodiment of the invention. The embodiment is first described generally with respect to FIG. 2, and detailed further below, with reference to subsequent figures.

As shown in FIG. 2, an idea for a GUI application represented schematically at 202 is first developed into a GUI usage scenario description at block 204. The GUI usage scenario 204 is then developed into an actual GUI script which implements the GUI usage scenario (for the given application environment). By way of example, the data processing system 100 of FIG. 1, running an Eclipse platform, may embody such an application environment, and the GUI script may be implemented to run in that application environment.

In an embodiment, the GUI script corresponding to the GUI usage scenario 204 may be generated by assembling pre-scripted parts 207 from a catalog 206. The pre-scripted parts 207 may be stored, for example, in storage unit 104 and copied to RAM 106 as necessary to be used by a software application running on the Eclipse platform to assemble the GUI script. In an embodiment, each pre-scripted part 207 may be configured to accept parameter values, such that the pre-scripted part 207 may be used for any number of situations where the GUI usage actions are the same, but the individual parameter values are different. If a particular pre-scripted part 207 is not available in the catalog 206, a scenario developer 208 may optionally create the required new pre-scripted part 207.

In an embodiment, a new pre-scripted part 207 may be created by recording a live GUI usage session using a GUI record/playback tool, and editing the resulting GUI script into a more generalized and reusable form. By way of example, the Rational® XDE Tester may be used to record a live GUI usage session running on the Eclipse platform. The live GUI recording is performed as directed by the recording tool's documentation, and the content of that recording is examined, looking for content that will vary from one use of the GUI action to another. Such values are candidates for parameterization, and the recorded GUI script is edited such that those values are passed as parameters from higher-level controlling call scripts.

As a specific example, consider a “raw” GUI script recorded using Rational XDE Tester shown in FIG. 3A (lines 230-243). By way of illustration, the GUI script recording has captured a simple GUI usage session in which a tree is expanded into a new view. As shown at line 240, a tree is expanded by clicking the RIGHT mouse button. Here, the path to a file to be opened is provided as a string “SomeProject−>src−>com.example−>MyFile.java”. In this string, there are a number of values that may change from one usage of the GUI script to another (i.e. the particulars of the file, folder, etc.).

Now referring to FIG. 3B, shown is an illustrative example of an amended “pre-scripted part” (e.g. a new pre-scripted part 207 in FIG. 2) corresponding to the recorded GUI script in FIG. 3A. More specifically, line 240 of FIG. 3A has been replaced by a general purpose version of the script “OpenFile” with various string parameters defined at lines 240 a-240 d in FIG. 3B. Line 240 e defines a string separator “−>” used by Rational XDE Tester to separate the string parameters at lines 240 a-240 d. Lines 240 f-240 k define a string variable, fullPath, in terms of the parameters defined in lines 240 a-240 d. At line 240 m, the path to the file as expressed in line 240 of FIG. 3A has been replaced by the string variable, fullPath.

Now referring to FIG. 3C, shown is an illustrative example of a controlling call script that, together with the illustrative pre-scripted part shown in FIG. 3B, may replace the recorded GUI script in FIG. 3A. More generally, the call script of FIG. 3C can call the new pre-scripted part in FIG. 3B using a callScript ( ) command. In this illustration, the callScript ( ) command is used to call the new general purpose script “OpenFile” with specific values for the parameters defined at lines 240 a-240 d in FIG. 3B.

As will be appreciated, by replacing the recorded values in the recorded script of FIG. 3A with variables passed through parameters, the function performed by the script in FIG. 3A has been generalized, and the new pre-scripted part of FIG. 3B (i.e. a new pre-scripted part 207 of FIG. 2) may be stored in a catalog (i.e. catalog 206 of FIG. 2) for later use by the scenario developer 208.

In an embodiment, the scenario developer 208 may use a script execution module 210 to generate/assemble the GUI script. The script execution module 210 may be embodied, for example, as another application 103 running on an Eclipse platform on the data processing system of FIG. 100. As will be appreciated, a substantially complete catalog 206 of pre-scripted parts 207 may make the task of assembling the GUI script significantly easier for the scenario developer 208.

In order to generate documentation for the GUI script generated by the scenario script development/execution tool 210, a documentation generation module 212 may be used to listen to the effect of the playback of the GUI script. (In an alternative embodiment, the documentation module 212 may listen to a live GUI usage session, although the repeatability and rapid development of the GUI script from one iteration to the next may be lost in that case.) The documentation generation module 212 may be embodied, for example, as another software application 103 running in another instance of the Eclipse platform on the data processing system 100 of FIG. 1.

In an embodiment, the documentation generation module 212 may create suitable shadow objects to listen to each GUI widget and shell (i.e. each GUI object) of interest, either as a GUI script is played back, or by listening directly to a live GUI usage session. As will be explained in detail further below, with reference to FIGS. 4 and 4A-4D, each shadow object may listen to and report details about a corresponding shadowed GUI object (e.g. GUI widget or shell) activities. As discussed below, these shadow objects may be created and discarded dynamically during the course of a GUI usage session, in order to shadow each and every GUI object of interest. The use of shadow objects allows details of GUI object activities to be recorded which may otherwise be lost (e.g. when listening to a GUI widget which terminates abruptly and details about that widget also disappear simultaneously).

Using such shadow objects, the documentation generation module 212 may convert a raw GUI script, or alternatively a live GUI usage session, into narrative language statements describing the shadowed GUI object activity. (An illustrative example of this conversion process is provided further below, with reference to FIGS. 5, 6A, 6B and 7.)

The resulting generated GUI scenario documentation 214 contains narrative language statements describing the activities of shadowed GUI objects in human-readable form. A scenario writer 216 may then edit the generated GUI scenario documentation 214 as desired to produce a final version of the documentation 218.

Referring back to the script execution module 210, once a GUI script has been developed, the GUI script may be stored in scenario script storage 220 for subsequent retrieval. This scenario script storage 220 allows previously generated GUI scripts to be retrieved and further amended as necessary, and may also provide a history of amendments, allowing backtracking to an earlier version if necessary.

In an embodiment, the script execution module 210 may be used to generate a product scenario script 222. Based on the GUI usage scenario 204, a full set of GUI scripts and supporting code may be generated and copied over to another system, such as a customer's computer system, to be executed. This may make GUI application development significantly easier since samples showing how the GUI usage scenario may be turned into a GUI script may serve as a valuable teaching tool, as well as a useful precedent for modification.

In an embodiment, the scenario writer 216 may control a screen capture tool 224 to capture screen shots for enhancing the scenario documentation 218. The screen capture tool 224 may be used, for example, by playing back a GUI script together with a corresponding GUI scenario documentation 214. When the playback is slowed down sufficiently, the scenario writer 216 has time to see that a particular screen shot is of interest, then captures the screen shot of interest using the screen capture tool 224. Thus, the resulting scenario documentation 218 may be enhanced by suitable screen captures at relevant places in the documentation.

In an embodiment, the screen capture tool 224 may also be used to create simplified “show me” demonstrations of portions of the GUI script. These show me demonstrations may be viewed by an end-user using a scenario viewlet 226 available, for example, via a “help” screen for the GUI application. Show me demonstrations may provide a set of relevant screen captures to show an end-user the information to be entered and where to enter it, providing a simple tutorial that may be more convenient than written instructions.

Now referring to FIG. 4, shown is a UML model of an illustrative set of shadow objects that may be created to listen to various widgets and shells of interest. In an embodiment, the documentation generation module 212 may create these shadow objects. As shown, the UML model of FIG. 4 includes a base shadow class 302, and a recorder class 304 assigned to the base shadow class 302. A plurality of shadow classes 306-314 are children of the base shadow class 302. (It will be appreciated that each shadow “object” as referenced elsewhere in the present description may be instantiated from a shadow “class” as described here.) The base shadow class 302 also has a generalization relationship with a shell shadow class 316, which is also a child of class 302. The shell shadow class 316 is associated with and listens to a corresponding shell or window of the GUI application of interest. A self-reference line 317 from the shell shadow class 316 onto itself indicates that other shell shadow classes may be instantiated to handle any other shells (e.g. pop-up windows) that may be created.

Each of the set of shadow classes 306-314 are also members of a resource activity view class 318. The resource activity view class 318 is associated with the shell shadow class 316 and is the root for the shadow classes of interest. The resource activity view class 318 is thus able to monitor all widget activities occurring within a shell shadow class 316.

For example, when a user opens the resource activity view, various high-level objects are created, including a recorder instantiated from the recorder class 304. The resource activity view listens to the recorder for reported GUI object activities.

As shown, associated with each shell shadow 316 is a widget shadow manager 319. The widget shadow manager 319 has a set of shadow classes 320-330 typically associated with various shell widgets, such as buttons, labels, text, and so on. Each of these shadow classes 320-330 are also children of a base control shadow class 232, which exists separately from the base shadow class 302 for programming convenience.

It will be appreciated by those skilled in the art that the various shadow classes shown in FIG. 4 are merely representative, and are not meant to be exhaustive in terms of the type of widget and shell activities that may be shadowed. Furthermore, it will be appreciated that variations of the UML model shown in FIG. 4 are possible, without departing from the general concept of creating shadow objects to listen to each GUI object (e.g. GUI widget or shell) of interest.

FIG. 4A is a schematic flow chart of an illustrative method 400A for creating some of the shadow objects according to the UML model of FIG. 4. More specifically, method 400A begins at block 404, where the recorder 304 of FIG. 4 is created. Method 400A then proceeds to block 406 at which the part shadow 306 is created. Continuing on, the page shadow 308 is created at block 408, the resource shadow 310 is created at block 410, the work bench window shadow 312 is created at block 412, and the menu shadow 314 is created at block 414. Method 400 a then proceeds to block 416 to create a shell shadow 316 to monitor the main shell (e.g. the main Eclipse platform workbench window). Method 400 a then ends. All shadow objects created by method 400 a will continue to exist for as long as the workbench window is active. Once the workbench ends, the shadows no longer exist, and may be recreated by restarting the workbench and repeating method 400A.

It will be appreciated that method 400A is merely an example of an illustrative set of shadow objects that may be created. In alternative embodiments, as many shadow objects as are required to listen to all widgets of interest in the shell may be created in a corresponding manner.

FIG. 4B is a schematic flow chart of a method 400B for creating a widget shadow manager (e.g. widget shadow manager 319 of FIG. 4) for each shell that may be created. More specifically, method 400B begins at block 421 by creating a shell shadow (e.g. shell shadow class 316 of FIG. 4) for the primary shell or window. Method 400B then creates a widget shadow manager (e.g. widget shadow manager 319 of FIG. 4) for that shell at 422. Method 400B then proceeds to decision block 423, where method 400B determines whether any additional shells (e.g. pop-up windows) have been created. If yes, method 400B proceeds to block 424, where an additional widget shadow manager is created for each new shell. Method 400B then proceeds to decision block 425. If no, method 400B proceeds directly to decision block 425 to determine if any shells have terminated (e.g. a pop-up window has closed). If yes, method 400B proceeds to block 426 where any corresponding widget shadow managers and their contained widget shadows are also terminated, possibly after polling them for activity. Method 400B then loops back to decision block 423 from decision block 427 for as long as the shadow managers continue to be required. Otherwise, method 400B ends.

FIG. 4C is a schematic flow chart of a method 400C for setting the type of monitoring to be done by each shadow object. Method 400C begins at decision block 431, where method 400 c determines whether a new widget is identified. If yes, method 400C proceeds to block 432, where the type of widget is identified. (If no, method 400C ends.) Method 400C then proceeds to block 434 where, depending on the type of widget, a corresponding shadow object is created and either set to listen to and report all widget activity immediately, or set to listen to the widget activity and report only when polled. Method 400C then loops back to decision block 431 and repeats until no new widgets are identified.

As an illustrative example, a type of widget activity that may be reported immediately is a user clicking on a button on the GUI. A corresponding button shadow object may immediately report the activity, as clicking the button may initiate an immediate action or response that could change the environment. The type of widget activity that is reported only when polled may be, for example, user entry of a series of characters in a text field. In such a case, rather than separately reporting each character typed by the user, a corresponding text shadow object listening to that text field may store all the characters typed, then wait for a subsequent triggering event (e.g. pressing the enter key, or clicking a button) which causes the text shadow object to report the typed characters. For example, the triggering of this reporting may come from the widget shadow manager as a result of other activities taking place (e.g. a button click as outlined above).

FIG. 4D is a schematic flow chart of a method for identifying all widgets of interest in a shell (e.g. a window), and creating a corresponding set of shadow objects for those widgets. More specifically, method 400D begins at block 442, where all widgets of interest within a shell (i.e. a window) are identified. By way of example, on the Eclipse platform, the widgets may be identified as being from the Standard Widget Toolkit (SWT). Method 400D then proceeds to block 444, where method 400D creates a shadow object to listen to each widget identified at block 442. In an embodiment, there is one instance of a shadow object created for each instance of a widget (e.g. three buttons will result in three button shadows). Method 400D then proceeds to decision block 445, where method 400D determines whether there are any new widgets that have been added to the shell referred to at block 442. If yes, method 400D proceeds to block 446 where a corresponding shadow object may be added for each new widget. If no, method 400D proceeds directly to decision block 447. Method 400D then proceeds to decision block 447, where method 400D determines whether any widget of interest currently being shadowed has been disposed or terminated. If yes, method 400D proceeds to block 448, where the corresponding shadow object may also be disposed (after reporting any necessary activity details for documentation). If no, method 400D proceeds directly to decision block 449. Method 400D then loops back to block 445 from decision block 449, until the documentation generation module 212 is terminated by the user. Method 400D then ends. As will be appreciated from this illustrative example, shadow objects may be dynamically created and disposed to shadow widgets of interest within a shell. While a method 400D for one shell has been shown, it will be appreciated that method 400D may be readily modified to accommodate multiple shells, or to apply to another shell, in a corresponding manner.

While method 400C and method 400D have been presented separately for the sake of illustration, it will be observed that the methods may overlap during actual use.

Now referring to FIG. 5, shown is an illustrative example of the GUI object activities reported by the shadow objects. The GUI script begins at line 501 with a “B_start_sequence” activity (shown in boldface in FIG. 5 for the purposes of illustration). The GUI script ends at line 534 with a “B_end_sequence” activity (again shown in boldface in FIG. 5 for the purposes of illustration). The recording shown at lines 501-534 is in its “raw” form, as generated using a script execution module (e.g. script execution module 210 of FIG. 2). As will now be explained, each “activity” in FIG. 5 may be identified and converted into a narrative language statement, such that much of the effort previously required to generate documentation for a GUI script may be eliminated.

Referring to FIG. 6A, shown is an illustrative pre-determined list of activities which may be generated in a GUI script, within a particular application environment. For example, at line 601A of FIG. 6A, the activity “B_start_sequence” boldfaced at line 501 in FIG. 5 is shown. At line 602A of FIG. 6A, the activity “B_end_sequence” boldfaced at line 534 of FIG. 5 is shown. Lines 603A-654A represent other types of activities that may be found in a GUI script. It will be observed that the illustrative GUI script shown in FIG. 5 uses only a subset of the activities listed in FIG. 6A.

Now referring to FIG. 6B, shown is a list of narrative language statements and formatting code corresponding to each of the GUI object activities listed in FIG. 6A. In the present illustrative example, the narrative language statements are formatted according to HTML, such that the statements can be readily formatted and displayed as an HTML page. Thus, as shown at line 601B, the “B_start_sequence” activity listed on Line 601A of FIG. 6A is converted simply to the HTML code “<ol>”. Also, the activity “B_end_sequence” at line 602A of FIG. 6A is converted simply to HTML code “</ol>” at line 602B. Lines 603B-654B provide formatted narrative language statements (formatted using HTML in the present illustrative example) corresponding to each of the activities listed at lines 603A-654A of FIG. 6A.

While the pre-determined list of GUI object activities in FIG. 6A is shown separately from the corresponding list of narrative language statements in FIG. 6B for the purposes of illustration, it will be appreciated that there may be a single list contained in a single file, or the conversion information may be alternatively stored in a relational database.

While the narrative language statements are formatted according to HTML for the purposes of illustration, it will be appreciated that, in alternative embodiments, virtually any desired type of formatting may be used, such as XML, XHTML, and so on.

Now referring to FIG. 7, shown at lines 701-710 is an illustrative example of GUI scenario documentation 214 with formatted narrative language statements generated from the “raw” recording of GUI object activities in FIG. 5, using the conversion list on FIG. 6A and FIG. 6B. This GUI scenario documentation 214 may then be edited by the scenario writer 216 (FIG. 2) to generate a final form of the scenario documentation 218 (FIG. 2).

Now referring to FIG. 8, shown is a schematic flow chart of an exemplary method 800 in accordance with an embodiment of the invention. More specifically, method 800 begins at block 802, where a GUI script based on a GUI usage scenario description (e.g. usage scenario 204 of FIG. 2) is generated. In one embodiment, as detailed in FIG. 8A, the GUI script may be assembled from pre-scripted parts (e.g. pre-scripted parts 207 from catalog 206 of FIG. 2). However, in another embodiment, the GUI script may be recorded directly from a live GUI usage session following the GUI usage scenario description.

Method 800 then proceeds to block 804, where the raw recording of a GUI usage session is converted (e.g. by documentation generation tool 212 of FIG. 2) into narrative language statements in a scenario script (e.g. GUI scenario documentation 214 of FIG. 2). Block 804 is described in further detail below with respect to FIG. 8B.

Method 800 then proceeds to block 806, where screen captures may be embedded in the GUI scenario documentation 214 by the scenario writer 216. Block 806 is described in further detail below with respect to FIG. 8C. Method 800 then ends.

Now referring to method 800A in FIG. 8A, method 800A begins at block 802A, where pre-scripted parts, as previously described, may be used to assemble a GUI script based on a GUI usage scenario description. In an embodiment, the pre-scripted parts may be available from a catalog of such parts, as previously described. Method 800A then proceeds to decision block 802B where, if a required pre-scripted part is not found, then method 800A proceeds to block 802C where the required scripted part is created, as previously described. Method 800A then loops back to block 802A from decision block 802D, until the GUI script is completely assembled. Method 800A then ends.

Now referring to method 800A in FIG. 8A, method 800A begins at decision block 802A, where method 800A determines if a suitable pre-scripted part has been found. If yes, method 800A proceeds to block 802C where, as previously described, the suitable pre-scripted part may be used to assemble a GUI script based on a GUI usage scenario description. In an embodiment, the pre-scripted parts may be available from a catalog of such parts, as previously described. If a suitable pre-scripted part is not found, method 800A proceeds to block 802B where the required scripted part is created, as previously described. Method 800A then proceeds to block 802C where the new pre-scripted part may be used to assemble the GUI script. Method 800A then loops back to decision block 802A from decision block 802D, until the GUI script is completely assembled. Method 800A then ends.

Now referring to method 800C in FIG. 8C, method 800C begins at block 806A, where the assembled GUI script is played back at a slower speed. During playback of the GUI script, a scenario writer (e.g. scenario writer 216 of FIG. 2) may trigger a screen capture, as shown at block 806B, for subsequent inclusion into the script. Method 800C loops back to block 806B from decision block 806C until the scenario writer 216 completes enhancing the resulting scenario documentation (e.g. scenario documentation 218 of FIG. 2). Method 800C then ends.

As will be appreciated, the embodiments described above are merely illustrative, and variations and modifications may become apparent to those skilled in the art after reading the description. For example, while the above embodiment describes assembling a GUI script using a catalog of pre-scripted parts, it will be apparent that the automatic documentation generation may be performed equally effectively on a GUI script generated from a “live” GUI recording session, or from a “live” interaction between the user and the subject GUI.

Furthermore, while the Eclipse platform has been described as one possible environment in which the present invention may be practiced, it will be apparent that the teachings of the present invention may extend to virtually any application development environment in which it is necessary to record a script, and to accurately document that script in an efficient manner.

Also, it will be apparent to those skilled in the art that the teachings of the present invention may be embodied in a computer executable program, which may be stored on a computer readable medium.

Therefore, the scope of the invention is limited only by the language of the following claims. 

1.-19. (canceled)
 20. A method of assembling a GUI script, comprising: (i) selecting a suitable pre-scripted part from a catalog of pre-scripted parts for assembling at least a portion of said GUI script, each pre-scripted part being configured to accept a parameter value in place of a recorded value; (ii) repeating (i) until all suitable pre-scripted parts are selected; and (iii) generating a call script configured to call said suitable pre-scripted parts, said call script being further configured to pass suitable parameter values to said selected pre-scripted parts.
 21. The method of claim 20, further comprising, before (iii): (iv) creating a new suitable pre-scripted part to accept a parameter value in place of a recorded value; and (v) repeating (iv) until all suitable pre-scripted parts necessary to complete said GUI script are available.
 22. The method of claim 21, wherein said creating in (iv) comprises modifying a previously recorded GUI script.
 23. The method of claim 20, further comprising replacing in said call script a pre-scripted part with another pre-scripted part to form a new version of said GUI script.
 24. The method of claim 23, further comprising storing multiple versions of said GUI script for subsequent retrieval.
 25. A system for assembling a GUI script, comprising: (a) a catalog of pre-scripted parts for assembling at least a portion of said GUI script, each pre-scripted part being configured to accept parameter values in place of recorded values; and (b) a script execution module for generating a call script configured to call suitable pre-scripted parts to assemble at least a part of said GUI script, said call script being further configured to pass suitable parameter values to said suitable pre-scripted parts.
 26. The system of claim 25, further comprising means for generating a new suitable pre-scripted part for said catalog.
 27. The system of claim 26, wherein said script execution module is configurable to replace in said call script a pre-scripted part with another pre-scripted part to form a new version of said GUI script.
 28. The system of claim 27, further comprising storage for storing multiple versions of said GUI script for subsequent retrieval.
 29. A computer readable medium containing computer executable code for assembling a GUI script, said computer executable code comprising: (a) code for selecting a suitable pre-scripted part from a catalog of pre-scripted parts for assembling at least a portion of said GUI script, each pre-scripted part being configured to accept a parameter value in place of a recorded value; (b) code for repeating (a) until all suitable pre-scripted parts are selected; and (c) code for generating a call script configured to call said suitable pre-scripted parts, said call script being further configured to pass suitable parameter values to said selected pre-scripted parts.
 30. The computer readable medium of claim 29, further comprising: (d) code for creating a new suitable pre-scripted part to accept a parameter value in place of a recorded value; and (e) code for repeating (d) until all suitable pre-scripted parts necessary to complete said GUI script are available.
 31. The computer readable medium of claim 29, wherein said code for creating in (d) comprises code for modifying a previously recorded GUI script.
 32. The computer readable medium of claim 29, further comprising code for replacing in said call script a pre-scripted part with another pre-scripted part to form a new version of said GUI script. 